package com.tsd.core.openweixin.model.material;

/**
 * 素材管理之获取素材总数返回结果
 */
public class WxMaterialCount {

    public final static String serverUrl = "https://api.weixin.qq.com/cgi-bin/material/get_materialcount";
    private String errorCode;
    private String errorMessage;
    private Integer voice_count;
    private Integer video_count;
    private Integer image_count;
    private Integer news_count;

    public boolean isSuccess() {
        return getErrorCode() == null || "-1".equals(getErrorCode());
    }

    /**
     * success value '0'
     *
     * @return
     */
    public String getErrorCode() {
        return errorCode;
    }

    /**
     * @param errorCode
     */
    public void setErrorCode(String errorCode) {
        this.errorCode = errorCode;
    }

    /**
     * success value 'ok'
     *
     * @return
     */
    public String getErrorMessage() {
        return errorMessage;
    }

    /**
     * @param errorMessage
     */
    public void setErrorMessage(String errorMessage) {
        this.errorMessage = errorMessage;
    }

    @Override
    public String toString() {
        return "WechatMessageResult{" + "errorCode=" + errorCode + ", errorMessage=" + errorMessage

                + ", voice_count=" + voice_count
                + ", image_count =" + image_count
                + ", news_count=" + news_count
                + ", video_count=" + video_count + '}';
    }

    public Integer getVoice_count() {
        return voice_count;
    }

    public void setVoice_count(Integer voice_count) {
        this.voice_count = voice_count;
    }

    public Integer getVideo_count() {
        return video_count;
    }

    public void setVideo_count(Integer video_count) {
        this.video_count = video_count;
    }

    public Integer getImage_count() {
        return image_count;
    }

    public void setImage_count(Integer image_count) {
        this.image_count = image_count;
    }

    public Integer getNews_count() {
        return news_count;
    }

    public void setNews_count(Integer news_count) {
        this.news_count = news_count;
    }

}
